The present embodiments relate to electronic circuits and are more particularly directed to a device that includes a dB-to-linear gain conversion system.
Electronic circuits have become prevalent in numerous applications and are used in devices in personal, business, and other environments. Demands of the marketplace affect many design aspects of these circuits, including factors such as device size, complexity, and cost. Various electronic circuits are directed to audio signal processing and, quite often, these circuits also are subject to these design factors. The preferred embodiments have particular application in such circuits, and may be used in other contexts as well.
In the field of audio processing, gain is considered either in linear space or in so-called dB space, where the relationship between the two is known and is shown in the following Equation 1a:Gain (in dB)=20 log10(linear gain)  Equation 1aAlso, Equation 1a may be re-arranged to solve for linear gain to express it in terms of dB gain as shown in the following Equation 1b:
                              linear          ⁢                                          ⁢          gain                =                  10                                    Gain              ⁡                              (                                  in                  ⁢                                                                          ⁢                  dB                                )                                      20                                              Equation        ⁢                                  ⁢        1        ⁢        b            Thus, gain can be considered in either space, and some designers often prefer one over the other. Indeed, in the context of digital audio design often dB space is more readily discussed. In dB space, the doubling of an audio signal gain (e.g., volume), that is, an increase times two in linear space, is often referred to as a +6 dB increase; actually, this statement is an approximation in that a linear increase times two equals a dB increase of slightly more than 6 dB, where the true difference is as shown in the following Equation 1c:20 log10(2)=6.02059991327962  Equation 1cThus, a digital designer seeking a linear gain increase times two often refers to this as a 6 dB increase, or seeking a linear gain times four might call for a 12 dB increase, and so forth. Further, to simplify the remaining discussion in this document, the result of Equation 1c is rounded to a value of 6.02 dB.
Given the preceding, in some prior art digital audio processing circuits, a user input is used to control a gain adjustment, where in response to the user provides the circuit imposes a gain on a processed signal. Typically, the gain control signal is provided by an independent conversion circuit, which consists of a large look-up table so as to derive the signal based on a desired dB change. For example, assume that a system provides a range of +6 dB to −39 dB, and permits adjustments at a granularity (or step) of 3 dB. In this instance, the look-up table may appear as shown in the following Table 1:
TABLE 1Select dBLinear gain inputSelect dBLinear gain input61.9953−180.125931.4125−210.089101−20.7943−30.7079−270.0447−60.5012−300.0316−90.3548−330.0224−120.2512−360.0158−150.1778−390.0112Given Table 1, when a user desires a certain dB adjustment in the gain of the processing circuit, the user provides some type of input and the appropriate linear gain is found in Table 1 and provided to the circuit. The user might cause the table to be consulted by turning a knob or otherwise providing an electrical signal of a certain magnitude, and that signal represents a dB magnitude that is then converted, via Table 1, to a corresponding linear gain. For example, if the user desires a gain of 3 dB, then the conversion circuit performs the look-up and a linear gain of 1.4125 is provided. As another example, if the user desires a gain of −6 dB, then the conversion circuit performs the look-up and a linear gain of 0.5012 is provided. The remaining examples will be appreciated by one skilled in the art.
While the approach of providing linear gain as described above has proven workable in various implementation, the present inventor has observed that it may be improved. For example, for a range of dB values from an upper limit U to a lower limit L, and with a granularity GR, then the prior art approach requires a table that stores a number of values equal to {(U−L)/GR+1}; thus, in the example of Table 1, U=6, L=−39, GR=3 and, hence, a total of 16 values are stored. Thus, where U and L are considerably distant from one another, and/or where G is small, the storage requirements for the look-up table can become quite large, thereby mandating sufficient hardware to accommodate this storage. Such requirements increase device size and cost, both of which may prove unacceptable in some implementations. Even if acceptable, a more efficient and desirable approach would require lesser storage for a same value of U, L, and GR. In view of these considerations as well as still further examples of possible drawbacks of the prior art as will be ascertainable by one skilled in the art, the present inventor endeavors to improve upon these matters as shown below in connection with the preferred embodiments.